<?php
class Me_Action extends Action{
	public function init(){
		$this->redis = new Redis();
		$this->redis->connect('127.0.0.1', 6379);
		$this->redis->select($this->_config['redisdb']);
	}
	public function index(){
		$cd = isset($_GET['cd'])?$_GET['cd']:'CN'; //格式如下，CN,US,ZH
		$level = isset($_GET['level'])?$_GET['level']:1;//格式如下 1,2,3
		$arr = $this->redis->hvals('proxy_vaild');
		foreach($arr as $k => $v){
			$data = explode('|',$v);
			if($_GET['aa']=='admin' || (strpos($cd,$data[4]) !== false && strpos($level,$data[3]) !==false )){
				#unset($data[8]);  #me不使用的
				#unset($data[9]);  #me不使用的
				#unset($data[10]); #me不使用的
				echo implode('|',$data)."\n";
			}
		}
	}


}